import Vue from 'vue'
import Router from 'vue-router'
import Home from '../views/layout/Home.vue'
import refresh from '../views/layout/refresh.vue'

//包裹
import kucun from '../views/baoguo/kucun.vue'
import kucunDetail from '../views/baoguo/kucun-detail.vue'
import jijian from '../views/baoguo/jijian.vue'
import jijianDetail from '../views/baoguo/jijian-detail.vue'
import jijianAdd from '../views/baoguo/jijian-add.vue'
//站点
import expressCompany from '../views/zhandian/expressCompany.vue'
import siteInfo from '../views/zhandian/siteInfo.vue'
import newSiteInfo from '../views/zhandian/newSiteInfo.vue'
import modifySiteInfo from '../views/zhandian/modifySiteInfo.vue'
import detailSiteInfo from '../views/zhandian/detailSiteInfo.vue'
import publicNumber from '../views/zhandian/publicNumber.vue'
//人员管理
import user from '../views/staff/user.vue'
import siteStaff from '../views/staff/siteStaff.vue'
import blackList from '../views/staff/blackList.vue'
//短信管理
import shortMessageVoucher from '../views/shortmessage/shortMessageVoucher.vue'
import shortMessageLog from '../views/shortmessage/shortMessageLog.vue'
//系统管理
import account from '../views/system/account.vue'
import role from '../views/system/role.vue'
import addRole from '../views/system/addRole.vue'
import editRole from '../views/system/editRole.vue'
import detailRole from '../views/system/detailRole.vue'
import log from '../views/system/log.vue'
//登录
import login from '../views/login/login'

import print from '../views/test/print'
import treeTable from '../views/test/treeTable'

Vue.use(Router)

export default new Router({
	routes: [{
			path: '/',
			component: Home,
			name: '首页',
			children: [{
				path: '/',
				component: refresh,
				name: '首页'
			}]
		},{
			path: '/',
			component: Home,
			name: 'print',
			children: [{
				path: 'print',
				component: print,
				name: 'print'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '包裹管理',
			children: [{
				path: 'kucun',
				component: kucun,
				name: '库存管理'
			}]
		}, {
			path: '/',
			component: Home,
			name: '包裹管理',
			children: [{
				path: 'kucundetail',
				component: kucunDetail,
				name: '库存详情'
			}]
		}, {
			path: '/',
			component: Home,
			name: '包裹管理',
			children: [{
				path: 'jijian',
				component: jijian,
				name: '寄件管理'
			}]
		}, {
			path: '/',
			component: Home,
			name: '包裹管理',
			children: [{
				path: 'jijiandetail',
				component: jijianDetail,
				name: '寄件详情'
			}]
		},{
			path: '/',
			component: Home,
			name: '包裹管理',
			children: [{
				path: 'jijianadd',
				component: jijianAdd,
				name: '新增寄件'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '站点管理',
			children: [{
				path: 'siteinfo',
				component: siteInfo,
				name: '站点信息管理'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '站点管理',
			children: [{
				path: 'publicnumber',
				component: publicNumber,
				name: '公众号入口统计'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '站点管理',
			children: [{
				path: 'expresscompany',
				component: expressCompany,
				name: '快递公司统计'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '站点管理',
			children: [{
				path: 'newsiteinfo',
				component: newSiteInfo,
				name: '新增站点信息'
			},{
				path: 'modifysiteinfo',
				component: modifySiteInfo,
				name: '修改站点信息'
			},{
				path: 'detailsiteinfo',
				component: detailSiteInfo,
				name: '站点信息详情'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '人员管理',
			children: [{
				path: 'user',
				component: user,
				name: '用户管理'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '人员管理',
			children: [{
				path: 'sitestaff',
				component: siteStaff,
				name: '站点人员管理'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '人员管理',
			children: [{
				path: 'blacklist',
				component: blackList,
				name: '黑名单'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '短信管理',
			children: [{
				path: 'shortmessagevoucher',
				component: shortMessageVoucher,
				name: '短信账户充值'
			}]
		}, {
			path: '/',
			component: Home,
			name: '短信管理',
			children: [{
				path: 'shortmessagelog',
				component: shortMessageLog,
				name: '短信记录'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '系统管理',
			children: [{
				path: 'account',
				component: account,
				name: '账号管理'
			}]
		},
		{
			path: '/',
			component: Home,
			name: '系统管理',
			children: [{
				path: 'role',
				component: role,
				name: '角色列表'
			}]
		}, {
			path: '/',
			component: Home,
			name: '系统管理',
			children: [{
				path: 'addrole',
				component: addRole,
				name: '添加角色'
			},{
				path: 'detailrole',
				component: detailRole,
				name: '角色详情'
			},{
				path: 'editrole',
				component: editRole,
				name: '编辑角色'
			}]
		}, {
			path: '/',
			component: Home,
			name: '系统管理',
			children: [{
				path: 'log',
				component: log,
				name: '系统日志'
			}]
		},
		{
			path: '/login',
			component: login,
			name: '登录'
		}
	]
})